6. As shown in Figure 1, in the Cartesian coordinate system $x O y$, $l_{A B}: y=k x+1$ intersects the $x$-axis and $y$-axis at points $A$ and $B$, respectively. Through $B$, $B C \perp A B$ is drawn, intersecting the $x$-axis at point $C$. Through $C$, $C D \perp B C$ is drawn, intersecting the $y$-axis at point $D$. Through $D$, $D E \perp C D$ is drawn, intersecting the $x$-axis at point $E$. If $A E=A C$, then the value of $k$ is $($.
(A) $\sqrt{2}$
(B) $-\sqrt{2}$
(C) $\frac{\sqrt{2}}{2}$
(D) $-\frac{\sqrt{2}}{2}$
6. A.

From the problem, we know $\triangle A B C \backsim \triangle C D E$. Therefore,
$$
\frac{C D}{A B}=\frac{C E}{A C}=2 \text {, }
$$

which means $C D=2 A B$.
Also, $\triangle A O B \backsim \triangle C O D$, so,
$$
\frac{A O}{C O}=\frac{A B}{C D}=\frac{1}{2}, C O=2 A O \text {. }
$$

Given $O B=1$, and $O B^{2}=O A \cdot O C$, we get $2 A O^{2}=O B^{2}, A O=\frac{\sqrt{2}}{2}$.

Thus, $A\left(-\frac{\sqrt{2}}{2}, 0\right)$.
Substituting point $A$ into $y=k x+1$, we solve for $k=\sqrt{2}$.