Documentation Sections

  1. Getting Started:

    • Installation and prerequisites.
    • Setting up the CLI.
  2. Authentication:

    • Registering an account.
    • Logging in.
    • Viewing the token.
  3. Application Management:

    • Creating, listing, associating, and deleting apps.
  4. Deployment:

    • Deploying files.
    • Checking deployment status.
    • Rolling back deployments.
  5. Domain Management:

    • Adding, listing, and removing domains.
  6. Analytics:

    • Viewing application analytics.

Markdown-Based Documentation

We can write this documentation in Markdown (.mdx) format for compatibility with Nextra.

Example getting-started.mdx:

# Getting Started
 
Welcome to the Rollout CLI documentation! This guide will help you set up and deploy your applications.
 
## Installation
 
### Prerequisites
- Node.js v14 or above
- NPM or Yarn
 
### Install the CLI
Run the following command to install the CLI globally:
```bash
npm install -g rollout-cli

Setting Up

  1. Verify installation:
    rollout --help
    You should see a list of available commands.
  2. Authenticate your account using the login command:
    rollout login

---

### Integrating with Nextra
To get started with Nextra for your documentation:

1. **Create a `docs` Directory**:
   Organize the Markdown files:

docs/ ├── getting-started.mdx ├── authentication.mdx ├── app-management.mdx ├── deployment.mdx ├── domains.mdx ├── analytics.mdx


2. **Link Sections**:
Add navigation links in `theme.config.js`:
```javascript
export default {
  logo: <span>Rollout Docs</span>,
  sidebar: [
    { title: 'Getting Started', link: '/docs/getting-started' },
    { title: 'Authentication', link: '/docs/authentication' },
    { title: 'App Management', link: '/docs/app-management' },
    { title: 'Deployment', link: '/docs/deployment' },
    { title: 'Domains', link: '/docs/domains' },
    { title: 'Analytics', link: '/docs/analytics' },
  ],
};

Converting Your Codebase Commands to Docs

Example: Register Command

Source Code Insight:

const answers = await inquirer.prompt([
    { type: 'input', name: 'name', message: 'Name:' },
    { type: 'input', name: 'email', message: 'Email:' },
    { type: 'password', name: 'password', message: 'Password:' },
    { type: 'password', name: 'password_confirmation', message: 'Confirm Password:' },
]);

Documentation Snippet:

# Authentication
 
## Registering an Account
 
To create a new Rollout account, use the following command:
```bash
rollout register

You will be prompted to provide:

  • Your name.
  • Your email address.
  • A secure password (and confirmation).

Example:

Name: John Doe
Email: [email protected]
Password: ********
Confirm Password: ********

If registration is successful, you will see the following message:

Registration successful! You can now log in using your credentials.

---

### Next Steps
- Let me know which sections you want to focus on first.
- I can start crafting the Markdown files for you based on the codebase you've shared.

Would you like me to create the first set of `.mdx` files or help set up your `docs` folder in the repository?