Computing units in a dg-algebra

Let $$\mathbb{G}_m= Spec(k[z,z^{-1}])$$ be the usual multiplicative group over a field $$k$$ viewed as a discrete commutative dg-algebra, and let $$A$$ be some arbitrary commutative dg-algebra concentrated in degrees $$\leq 0$$. How do I compute the $$A$$-values of $$\mathbb{G}_m$$ in the $$\infty$$-category of derived affine schemes?

On the level of spaces, I'm pretty sure $$Maps(Spec(A), \mathbb{G}_m)$$ can be described as the union of invertible path components of $$Maps(Spec(A), \mathbb{A}^1)=Hom_k(k, A)$$, where the space inherits a multiplication from the coalgebra structure on $$k$$. However, I'd like to have a more concrete description of this. What does an invertible map $$k \to A$$ look like? I'd also be satisfied with a concrete example, e.g. when $$A$$ is the Koszul complex or something like that.

• Mapping spaces in the dg setting tend to be messy, but if you're willing to assume $A_0 \to H_0A$ complete (noting that such completion is harmless for Noetherian DGAs), then a model for $\mathbf{R} \mathbb{G}_m(A)$ is as follows. Let $I= \ker(A \to H_0A)$, and $N^{-1}$ be Dold-Kan denormalisation, then take the pushout of the diagram $N^{-1}I \leftarrow I_0 \xrightarrow{\exp} A_0^{\times}$ of simplicial abelian groups. – Jon Pridham Oct 26 '19 at 20:29

Since the polynomial algebra $$k[z]$$ is free in the infinity category of cdgas, the space of maps $$Spec(A) \to \mathbb{A}^1$$ is equivalent to the "underlying space" of the cdga $$A$$. Here "space" means $$\infty$$-groupoid, or object of the $$\infty$$-category of spaces.
The underlying space of $$A$$ is what you get when you forget the addition and multiplication. First, if you forget the multiplication of a cdga, you end up with just a (connective) chain complex. By Dold-Kan that's the same thing as a simplicial abelian group. Forget the addition and you're left with just a simplicial set. The homotopy type of that simplicial set is the "underlying space" of the cdga. As a simple exercise you can work this out for some example, e.g. for $$A$$ the cdga of functions on the derived self-intersection of the origin in $$\mathbb{A}^1$$.
Then by the universal property of the localization $$k[z,z^{-1}]$$, the space of maps $$Spec(A) \to \mathbb{G}_m$$ is the union of connected components of $$Maps(Spec(A), \mathbb{A}^1)$$, namely those connected components $$f : Spec(A) \to \mathbb{A}^1$$ which correspond to a unit of $$H^0(A)$$. So you can model this by taking the simplicial set $$X$$ above, which models the underlying space of $$A$$, and then taking the appropriate simplicial subset. That is, take the pullback $$X \times_{N\pi_0(X)} NU$$, where $$U \subset \pi_0(X)$$ is the subset of units and $$N$$ stands for nerve.