# Quickstart

Before you begin, make sure you have Tabnine CLI installed:

[**Installation Guide**](/main/getting-started/tabnine-cli/getting-started/installation.md) - Install Tabnine CLI on your system

If you've already installed Tabnine CLI, you're ready to go!

***

### Step 1: Start Tabnine CLI

Open your terminal and start Tabnine CLI:

```bash
tabnine
```

### Step 2: Authenticate

On first run, you may be prompted to authenticate. Follow the on-screen instructions to log in with your Tabnine account.

### Step 3: Your First Conversation

Once authenticated, you're ready to use Tabnine CLI!

#### Example 1: Ask a Question

```
> What is Tabnine CLI and how can it help me?
```

The AI will explain Tabnine CLI's capabilities.

#### Example 2: List Files

```
> What files are in the current directory?
```

Tabnine CLI will show you the directory structure.

#### Example 3: Read and Explain Code

```
> Read the package.json file and explain what this project does
```

The AI will read the file and provide an analysis.

#### Example 4: Write Code

```
> Create a simple Node.js HTTP server that responds with "Hello World"
```

Tabnine CLI will generate the code and can write it to a file if you confirm.

### Essential Commands

Tabnine CLI has built-in slash commands. Here are the most useful:

#### Get Help

```
> /help
```

Shows all available commands and keyboard shortcuts.

<figure><img src="/files/V1jFvuSnYV5d7Mf0wrDc" alt=""><figcaption></figcaption></figure>

#### Change Model

```
> /model
```

Opens a dialog to select a different AI model.

<figure><img src="/files/25DSsCG0PVQ1ZD6VrZpD" alt=""><figcaption></figcaption></figure>

#### Clear Conversation

```
> /clear
```

Clears the current conversation history.

#### View Settings

```
> /settings
```

Opens the settings dialog to configure Tabnine CLI.

#### Exit

Press `Ctrl+C` or type:

```
> /quit
```

### Working with Files

#### Read Files

Reference files using the `@` symbol:

```
> Explain what @src/index.ts does
```

The AI will automatically read and analyze the file.

#### Edit Files

```
> In @src/index.ts, add error handling to the main function
```

The AI will propose changes and ask for confirmation before modifying the file.

#### Create Files

```
> Create a new file README.md with documentation for this project
```

The AI will generate content and create the file (with your confirmation).

#### Search Files

```
> Find all TODO comments in @src/
```

The AI will search through your files.

### Using for Different Tasks

#### Code Review

```
> Review @src/auth.ts and suggest improvements
```

Get AI-powered feedback on your code.

#### Bug Fixing

```
> I'm getting a TypeError in @src/server.ts line 45. Help me fix it
```

Get help debugging issues.

#### Documentation

```
> Generate JSDoc comments for all functions in @src/utils.ts
```

Automatically create documentation.

#### Learning

```
> Explain how the authentication system works in this project
```

Understand your codebase better.

### Keyboard Shortcuts

Master these shortcuts for efficiency:

| Shortcut  | Action              |
| --------- | ------------------- |
| `Ctrl+C`  | Exit Tabnine CLI    |
| `Ctrl+L`  | Clear screen        |
| `↑` / `↓` | Navigate history    |
| `Ctrl+U`  | Clear current input |

Type `/help` to see all shortcuts.

### Non-Interactive Mode

For scripts and automation, use non-interactive mode:

{% hint style="info" %}
Non-interactive mode still requires authentication.

* Set `TABNINE_TOKEN` environment variable to a [Personal Access Token](/main/administering-tabnine/managing-your-team/settings/access-tokens.md) generated in the Tabnine admin console.
* Or sign in once in interactive mode (`tabnine`) and authenticate with Tabnine using the OAuth flow.

If both are present, `TABNINE_TOKEN` takes precedence.
{% endhint %}

```bash
# Simple text output
tabnine -p "What are the main dependencies in package.json?"

# JSON output (for parsing)
tabnine -p "Analyze the project structure" --output-format json

# Process a file
cat myfile.js | tabnine -p "Review this code for security issues"
```

### Pro Tips

#### Be Specific

❌ "Review my code"\
✅ "Review @src/auth.ts for security vulnerabilities and error handling"

#### Use Context

Add project context with a `TABNINE.md` file in your project root:

```markdown
# Project Context

This is a TypeScript Node.js project for building web APIs.

## Key Conventions
- Use async/await for asynchronous code
- Add JSDoc comments to all exported functions
- Write unit tests in __tests__/ directories
```

#### Chain Tasks

```
> First, run the tests with `npm test`. If they pass, commit the changes with message "Add feature X"
```

#### Use Remote Code Search

```
> Using Remote Code Search, find all functions that handle user authentication
```

#### Get Coaching

```
> Based on coding best practices, review @src/api/ and suggest improvements
```

### Common Workflows

#### Morning Code Review

```
> Review the changes I made yesterday in @src/
```

#### Before Committing

```
> Check @src/ for:
> - Security issues
> - Missing error handling  
> - Code quality problems
```

#### Learning New Code

```
> I'm new to this codebase. Explain the overall architecture and where I should start
```

#### Refactoring

```
> Suggest refactoring opportunities in @src/services/ to improve maintainability
```

### Troubleshooting

#### Slow Response

If responses are slow:

1. Check your network connection
2. Try a different model with `/model`
3. Be more specific in your prompts
4. See [Troubleshooting Guide](/main/getting-started/tabnine-cli/troubleshooting/common-issues.md)

#### Command Not Found

If you see "command not found: tabnine":

1. Verify Tabnine CLI is installed - see [**Installation Guide**](/main/getting-started/tabnine-cli/getting-started/installation.md)
2. Check your PATH configuration
3. Try running with full path: `~/.local/bin/tabnine` (Linux/macOS)

### Next Steps

Now that you're familiar with the basics:

#### Learn More

* [**Installation Guide**](/main/getting-started/tabnine-cli/getting-started/installation.md) - Installation and setup reference
* [**Commands Reference**](/main/getting-started/tabnine-cli/features/commands.md) - All available commands
* [**Keyboard Shortcuts**](/main/getting-started/tabnine-cli/features/keyboard-shortcuts.md) - Productivity tips
* [**Settings**](broken://spaces/Y2qxVf5VTm3fmwP4B4Gx/pages/3fe53bae5fd7e1f94f87a74a12bc594846e75312) - Configure Tabnine CLI

#### Explore Powerful Features

* [**Remote Code Search**](/main/administering-tabnine/managing-your-team/context-engine.md) - Search large codebases
* [**Coaching Guidelines** ](/main/administering-tabnine/managing-your-team/context-engine/coaching-guidelines-v.md)- Get best practices
* [**Built-in Tools**](/main/getting-started/tabnine-cli/features/built-in-tools.md) - What tools are available
* [**Checkpointing**](/main/getting-started/tabnine-cli/features/checkpointing.md) - Undo file changes

#### See Real Examples

* [**Code Review**](/main/getting-started/tabnine-cli/examples/code-review.md) - Comprehensive review workflows

#### Get Help

* [**FAQ**](/main/getting-started/tabnine-cli/troubleshooting/faq.md) - Common questions
* [**Troubleshooting**](/main/getting-started/tabnine-cli/troubleshooting/common-issues.md) - Solve problems
* **In-App Help**: Type `/help` anytime

### Practice Exercise

{% stepper %}
{% step %}
**Start Tabnine CLI**

Start the CLI:

`tabnine`
{% endstep %}

{% step %}
**List files**

Ask:

`What files are in this directory?`
{% endstep %}

{% step %}
**Read a file**

Ask:

`Explain what @package.json contains`
{% endstep %}

{% step %}
**Get help**

Type:

`/help`
{% endstep %}

{% step %}
**Change model**

Type:

`/model` and explore options
{% endstep %}

{% step %}
**Ask about code**

Ask:

`What are the best practices for error handling?`
{% endstep %}
{% endstepper %}

Congratulations! You're now ready to use Tabnine CLI effectively. Happy coding! 🎉


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tabnine.com/main/getting-started/tabnine-cli/getting-started/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
