TNC CLI Documentation
The official command-line interface for ThinknCollab. Streamline your development workflow, automate tasks, and deploy with confidence.
Installation
Install via npm
npm install -g @thinkncollab/cli
                    Verify Installation
tnc-cli --version
                Authentication
Login to Your Account
tnc-cli login
                    This command will:
- Open your browser for OAuth authentication
 - Store your credentials securely
 - Configure your default workspace
 
Logout
tnc-cli logout
                    Check Authentication Status
tnc-cli whoami
                Quick Start
# 1. Install the CLI
npm install -g @thinkncollab/cli
# 2. Authenticate
tnc-cli login
# 3. Create a new project
tnc-cli init my-awesome-app
# 4. Navigate to project
cd my-awesome-app
# 5. Start development
tnc-cli serve
# 6. Deploy when ready
tnc-cli deploy --production
                Project Management
Initialize a New Project
tnc-cli init [project-name]
                    Options:
--template <name>: Choose a specific template--typescript: Initialize with TypeScript--description <text>: Project description
Examples:
tnc-cli init my-app
tnc-cli init my-api --template node-api
tnc-cli init my-frontend --typescript
                    List Your Projects
tnc-cli projects:list
                    Clone an Existing Project
tnc-cli projects:clone <project-id>
                    Project Information
tnc-cli projects:info
                Development Commands
Development Server
Start a local development environment with hot reload
tnc-cli serve
                        Build Project
Compile and optimize your application for production
tnc-cli build
                        Testing
Run your test suite with various configurations
tnc-cli test
                        Start Development Server
tnc-cli serve
                    Options:
--port <number>: Specify port (default: 3000)--host <hostname>: Specify host--open: Open in browser automatically
Build Project
tnc-cli build
                    Options:
--production: Production-optimized build--analyze: Bundle analysis
Run Tests
tnc-cli test
                    Options:
--watch: Watch mode--coverage: Generate coverage report
Deployment
Deploy to Staging
tnc-cli deploy --staging
                    Deploy to Production
tnc-cli deploy --production
                    Deploy with Specific Environment
tnc-cli deploy --env production
                    List Deployments
tnc-cli deployments:list
                    View Deployment Status
tnc-cli deployments:status <deployment-id>
                    Rollback Deployment
tnc-cli deployments:rollback <deployment-id>
                Environment Configuration
Set Environment Variable
tnc-cli env:set API_KEY=your_key_here
                    Get Environment Variable
tnc-cli env:get API_KEY
                    List All Environment Variables
tnc-cli env:list
                    Remove Environment Variable
tnc-cli env:remove API_KEY
                    Import Environment from File
tnc-cli env:import .env.production
                Database Commands
Run Database Migrations
tnc-cli db:migrate
                    Rollback Last Migration
tnc-cli db:rollback
                    Seed Database
tnc-cli db:seed
                    Create New Migration
tnc-cli make:migration create_users_table
                    Database Status
tnc-cli db:status
                Team Collaboration
Invite Team Member
tnc-cli team:invite user@example.com
                    List Team Members
tnc-cli team:list
                    Remove Team Member
tnc-cli team:remove user@example.com
                    Change Member Role
tnc-cli team:role user@example.com admin
                    Create Team
tnc-cli team:create "Engineering Team"
                Monitoring & Logs
View Application Logs
tnc-cli logs
                    Options:
--follow: Follow log output--tail <number>: Show last N lines--environment <env>: Specific environment
View Metrics
tnc-cli metrics
                    Check Health
tnc-cli health
                    Performance Monitoring
tnc-cli performance
                Advanced Usage
Custom Scripts
// In package.json
{
  "scripts": {
    "dev": "tnc-cli serve --port 3000",
    "deploy:prod": "tnc-cli build --production && tnc-cli deploy --production",
    "test:cov": "tnc-cli test --coverage",
    "db:reset": "tnc-cli db:rollback && tnc-cli db:migrate && tnc-cli db:seed"
  }
}
                    Configuration File
// tnc.config.js
module.exports = {
  projectId: 'your-project-id',
  build: {
    output: 'dist',
    commands: {
      build: 'npm run build',
      test: 'npm test'
    }
  },
  environments: {
    staging: {
      url: 'https://staging.your-app.tnc.app',
      env: {
        NODE_ENV: 'staging'
      }
    },
    production: {
      url: 'https://your-app.tnc.app',
      env: {
        NODE_ENV: 'production'
      }
    }
  },
  hooks: {
    'pre-deploy': 'npm run test',
    'post-deploy': 'npm run notify'
  }
};
                    Plugin System
# Install plugins
tnc-cli plugins:install @thinkncollab/plugin-database
tnc-cli plugins:install @thinkncollab/plugin-auth
# List installed plugins
tnc-cli plugins:list
# Remove plugin
tnc-cli plugins:remove @thinkncollab/plugin-database
                Troubleshooting
Clear Cache
tnc-cli cache:clear
                    Debug Mode
tnc-cli --debug [command]
                    Check System Info
tnc-cli system:info
                    Update CLI
npm update -g @thinkncollab/cli
                    Reset Configuration
tnc-cli config:reset
                    View Diagnostic Information
tnc-cli diagnose
                Frequently Asked Questions
How do I reset my password?
Use tnc-cli auth:reset-password or reset through the web dashboard.
Can I use TNC-cli CLI in CI/CD pipelines?
Yes! Use tnc-cli login --ci for non-interactive authentication in CI environments.
How do I switch between workspaces?
Use tnc-cli workspace:switch <workspace-id> to change active workspace.
Where are the logs stored?
Local logs are in ~/.thinkncollab/logs/, application logs are accessible via tnc-cli logs.
Get Help
Contact Support
tnc-cli support:contact
                    Or email us at admin@thinkncollab.com