C
CoderspaE
/Documentation

CoderspaE CLI

Command-line interface for CoderspaE platform. Submit problems, manage battles, and access platform features directly from your terminal.

Installation

Using npm

npm install -g @coderspae/cli

Using curl (Linux/macOS)

curl -fsSL https://cli.coderspae.com/install.sh | sh

Using PowerShell (Windows)

iwr https://cli.coderspae.com/install.ps1 | iex

Authentication

Login to your CoderspaE account:

coderspae login

Or use API key authentication:

coderspae config set api_key YOUR_API_KEY

Basic Commands

Problem Management

coderspae problems listList available problems
coderspae problems show 123Show problem details
coderspae submit solution.pySubmit solution

Battle Commands

coderspae battle joinJoin a quick battle
coderspae battle historyView battle history
coderspae battle create --mode=arenaCreate custom battle

Profile & Stats

coderspae profileShow your profile
coderspae statsView statistics
coderspae leaderboardView rankings

Advanced Features

Automated Testing

Test your solutions locally before submission:

# Test with sample cases
coderspae test solution.py --problem=123

# Test with custom input
coderspae test solution.py --input="1 2 3"

# Benchmark performance
coderspae test solution.py --benchmark

Workspace Management

# Initialize workspace
coderspae init my-solutions

# Generate template
coderspae generate --problem=123 --lang=python

# Sync with cloud
coderspae sync push

Team Collaboration

# Join team
coderspae team join team-warriors

# Share solution
coderspae share solution.py --team

# Team practice
coderspae practice --team --topic=dp

Configuration

Global Config

# Set default language
coderspae config set default_language python

# Set editor
coderspae config set editor "code"

# Set theme
coderspae config set theme dark

Project Config (.coderspae.yml)

# .coderspae.yml
project:
  name: "My Solutions"
  language: python
  template_dir: ./templates
  
settings:
  auto_test: true
  auto_format: true
  backup_solutions: true
  
battle:
  preferred_difficulty: medium
  auto_join: false

Plugins & Extensions

VS Code Extension

Integrate CLI with Visual Studio Code for seamless development.

coderspae install vscode-extension

Git Integration

Auto-commit solutions and sync with GitHub.

coderspae plugin install git-sync

AI Assistant

Get hints and code suggestions powered by AI.

coderspae plugin install ai-assistant

Troubleshooting

Common Issues

Authentication Failed

Solution:

coderspae logout && coderspae login

Network Timeout

Increase timeout:

coderspae config set timeout 60

Debug Mode

coderspae --debug command