Loading video...

Video Failed to Load

Go Home

we added the `/cd` command to OpenCode with auto-completion to make it super easy to move sessions around

17,158 views • 2 months ago •via X (Twitter)

19 Comments

dax's profile picture
dax2 months ago

hey you stole the demo i was gonna steal from you

ByShovel's profile picture
ByShovel2 months ago

the filesystem metaphor quietly keeps winning: cd into a session like it's a directory and suddenly the mental model needs no documentation.

Titus Magnus's profile picture
Titus Magnus2 months ago

Thanks man. This is one of those things that you don't truly know how much you need before you get it.

yamz8's profile picture
yamz82 months ago

nice touch

Ike Victor's profile picture
Ike Victor2 months ago

Finally this is actually a big deal. Multiple sessions in a single tui instance, all with different base dirs, was a big pain point for me.

Location Artistry's profile picture
Location Artistry2 months ago

opencode is so boss, such a great product!

milos's profile picture
milos2 months ago

@thdxr Yo this is great! Love those little things

Akram Ahmed's profile picture
Akram Ahmed2 months ago

fk yeah, thanks a bunch for this

Alex Kolovsky's profile picture
Alex Kolovsky2 months ago

the thing that bites me with cd inside a long session is stale relative paths in earlier tool calls. does /cd rewrite them or just move cwd forward?

James Long's profile picture
James Long2 months ago

we add a synthetic message so the model knows it's moved, and yes we try to update paths. for example a bash tool will prefix the call with the path it was called from (it should at least)

Alex Kolovsky's profile picture
Alex Kolovsky2 months ago

the case i'd worry about is compaction eating the synthetic message while the old ls output stays. does it get pinned, or re-emitted on the next tool call?

Tim Bendt's profile picture
Tim Bendt2 months ago

I knew I wanted this... but didn't know exactly

David Hapunkt's profile picture
David Hapunkt2 months ago

Why do you move sessions instead of adding folders to them?

Jonathan Dunlap's profile picture
Jonathan Dunlap2 months ago

Can we please have a dir explorer to create a new session?

Bitr0t ⌨️'s profile picture
Bitr0t ⌨️2 months ago

Nice!! The opencode TUI is impressively good. I think the go plan onboarding needs some love! I got Go today and downloaded opencode, added my key and I can’t use my go sub? All the models are “Zen”.

moshik's profile picture
moshik2 months ago

I NEEDED THAT TODAY! 👏🏼

Lalit Jangid 🇮🇳's profile picture
Lalit Jangid 🇮🇳2 months ago

wow...

TheGOAT's profile picture
TheGOAT2 months ago

good feature

Filip Ganyicz's profile picture
Filip Ganyicz2 months ago

@thdxr Hell yeah

Related Videos