> ## Documentation Index
> Fetch the complete documentation index at: https://docs.julep.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Getting started with Julep CLI

## Overview

The `julep` CLI provides a comprehensive command-line interface for interacting with the Julep platform. It enables you to manage agents, tasks, tools, and projects directly from your terminal.

## Installation

<CodeGroup>
  ```bash pip theme={"dark"}
  pip install julep-cli
  ```
</CodeGroup>

Note: While the package name is `julep-cli`, the installed command is simply `julep`.

## Configuration

The CLI stores configuration data in `~/.config/julep/config.yml`. This file is created automatically after authenticating using `julep auth` (see [Authentication](/julepcli/commands#authentication) section).

<CodeGroup>
  ```yaml config.yml theme={"dark"}
  api_key: "your_api_key_here"
  environment: "production"
  ```
</CodeGroup>

## Project Structure

A Julep project follows a standard directory structure:

```plaintext theme={"dark"}
project-name/
├── README.md         # Documentation and usage instructions
├── julep.yaml        # Project configuration and entrypoint
├── julep-lock.json   # Lock file tracking server state
└── src/              # Source directory
    ├── agents/       # Agent definitions
    │   └── agent.yaml
    ├── tasks/        # Task definitions
    │   └── task.yaml
    └── tools/        # Tool definitions
        └── tool.yaml
```

The `julep.yaml` file defines your project configuration:

<CodeGroup>
  ```yaml julep.yaml theme={"dark"}
  agents:
  - definition: src/agents/agent.yaml
  - definition: src/agents/another-agent.yaml

  tasks:
  - agent_id: "{agents[0].id}"
    definition: src/tasks/task.yaml
  - agent_id: "{agents[1].id}"
    definition: src/tasks/another-task.yaml

  tools:
  - agent_id: "{agents[0].id}"
    definition: src/tools/tool.yaml
  - agent_id: "{agents[1].id}"
    definition: src/tools/another-tool.yaml
  ```
</CodeGroup>

The `julep-lock.json` file tracks the state of your project on the Julep platform, mapping local files to their remote counterparts and maintaining relationships between components. This file should be committed to version control to ensure consistent state across team members.
To know more about the schema and the usage of the `julep-lock.json` file, you can read the [Lockfile](https://github.com/julep-ai/julep/tree/dev/cli/README.md#schema-for-julep-lockjson) section.

## Getting Started

To get started with the CLI, follow these steps:

<Steps>
  <Step title="Authenticate">
    ```bash theme={"dark"}
    julep auth
    ```

    The `auth` command is used to authenticate with the Julep platform. You need to provide your API key. You can find your API key [here](https://dashboard.julep.ai/).
  </Step>

  <Step title="Initialize Project">
    ```bash theme={"dark"}
    julep init --template profiling-recommending
    ```

    The `init` command is used to initialize a new Julep project. There are bunch of templates to get you started which you can find [here](https://github.com/julep-ai/library).
  </Step>

  <Step title="Sync Project">
    ```bash theme={"dark"}
    julep sync
    ```

    The `sync` command is used to synchronize the local project with the Julep platform. This creates a `julep-lock.json` file which tracks the state of the project on the Julep platform (see [Sync Command](/julepcli/commands#sync) for more details).
  </Step>

  <Step title="Edit the project">
    Once the project is initialized, you can edit the project in the `julep.yaml` file. Add agents, tasks, tools, etc. in the `src` directory.
  </Step>

  <Step title="Re-Sync Project">
    ```bash theme={"dark"}
    julep sync --force-local
    ```

    After editing the project, you can re-sync the project with the Julep platform. This will update the `julep-lock.json` file with the latest state of the project on the Julep platform.
    You can use the `--watch` flag to watch the project for changes and re-sync automatically.
  </Step>

  <Step title="Run the project">
    ```bash theme={"dark"}
    julep run --task <task_id> --input '{"key": "value"}'
    ```

    The `run` command is used to run a task. You can find the task ID in the `julep-lock.json` file.
  </Step>

  <Step title="View the execution">
    ```bash theme={"dark"}
    julep logs --execution-id <execution_id> --tail
    ```

    The `logs` command is used to view the logs of an execution. When you run the `run` command, it will return the execution ID.
  </Step>
</Steps>

<Note>
  You can find more commands in the [Command Reference](/julepcli/commands) section.
</Note>

## Support

If you need help with further questions in Julep:

* Join our [Discord community](https://discord.com/invite/JTSBGRZrzj)
* Check the [GitHub repository](https://github.com/julep-ai/julep)
* Contact support at [hey@julep.ai](mailto:hey@julep.ai)
