What a space is in Gemini CLI and why you'd create one
A space in Gemini CLI is a separate conversation environment where you can talk to the AI model with its own context and history. Each space keeps its own chat thread — messages you send in one space don't appear in another. You create a new space when you want to start fresh on a different topic, keep work projects separate from personal questions, or test different prompts without cluttering your main conversation.
Think of spaces like separate notebooks. You might have one for coding questions, one for writing feedback, and one for brainstorming. The AI doesn't carry over what you discussed in the coding notebook when you switch to the writing one.
Key Takeaways
- Type gemini space create [name] at your command line prompt to make a new space, replacing [name] with whatever you want to call it.
- Use gemini space list to see all your existing spaces and which one is currently active.
- Switch between spaces with gemini space switch [name] — your conversation history stays in each space separately.
- Each space starts with a blank conversation, so the AI has no memory of what you discussed in other spaces.
Creating your first new space
Open your terminal or command prompt and type the command exactly as shown:
gemini space create my-project
Replace my-project with whatever name makes sense for what you're working on. Use hyphens instead of spaces — the command line reads hyphens as part of the name, but spaces tell it you're starting a new command. So gemini space create my-project works, but gemini space create my project creates a space called my and then tries to do something with project, which fails.
If the command succeeds, you'll see a message confirming the space was created and that you're now inside it. Your command prompt may change to show the active space name, depending on how your Gemini CLI is configured.
Naming spaces so you can find them later
Use names that tell you what the space is for. gemini space create python-debugging is more useful than gemini space create space1 because six weeks later you'll remember what you were doing. Names are case-insensitive — Python-Debugging and python-debugging refer to the same space.
Keep names short enough to type without mistakes. gemini space create client-website-redesign-feedback works, but gemini space create cwrf is faster to switch to when you're jumping between multiple spaces in one session.
Avoid special characters like @, #, or ! — they have meaning in the command line and can cause errors. Hyphens, underscores, and numbers are safe.
Switching between spaces you've already made
Once you've created multiple spaces, move between them with:
gemini space switch python-debugging
Replace python-debugging with the name of the space you want to enter. When you switch, your previous conversation stays saved in the space you left, and you land in a blank conversation in the new space. The AI won't remember anything from your other spaces.
If you forget which spaces you have, type gemini space list to see them all. The output shows which space is currently active, usually marked with an asterisk or arrow.
What happens to your conversation history
Each space keeps its own complete chat history. If you ask the AI a question in python-debugging, then switch to client-website-redesign-feedback, the AI in the new space has no record of your Python question. When you switch back to python-debugging, your entire conversation is still there.
This separation is useful when you want to keep contexts completely separate, but it also means you can't reference something you discussed in another space. If you need to bring information from one space into another, you have to type it or copy it yourself.
Deleting a space you no longer need
If you create a space and decide you don't need it, remove it with:
gemini space delete space-name
Replace space-name with the name of the space. The command usually asks you to confirm before deleting, because once it's gone, the conversation history in that space is gone too. If you're not sure whether you'll need it again, you can also just leave it — extra spaces don't slow anything down.
You cannot delete the space you're currently inside. If you're in python-debugging and want to delete it, switch to a different space first, then delete it.
Frequently Asked Questions
Can I rename a space after I create it?
Gemini CLI doesn't have a built-in rename command. The workaround is to create a new space with the name you want, copy any important conversation content manually if needed, then delete the old space. It's not ideal, so choose your space names carefully the first time.
What's the difference between a space and just starting a new conversation?
Spaces are persistent — they stay around between sessions. If you close your terminal and come back tomorrow, your spaces and their conversation histories are still there. A new conversation within the same space adds to that space's history. Spaces let you organize by topic; conversations within a space are just the chronological record of what you discussed.
Can I share a space with someone else?
Spaces are local to your computer and your Gemini CLI installation. You cannot directly share a space with another person. If you need to share a conversation, you'd copy the text and send it to them separately, or they'd create their own space and you'd walk them through the same prompts.
How many spaces can I create?
There's no hard limit in Gemini CLI itself. You can create as many spaces as you want. The practical limit is how many you can keep track of — if you have fifty spaces with similar names, finding the right one becomes tedious. Most people work with three to ten active spaces at a time.
Do spaces take up storage on my computer?
Yes, each space's conversation history is stored locally. A typical conversation takes up a small amount of space — kilobytes, not megabytes — so even dozens of spaces won't noticeably affect your computer's storage. If you're running low on disk space and have old spaces you don't need, deleting them frees up a tiny bit of room.