Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

CodeRunner-SD/CodeRunner-Old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeRunner

A CLI tool to run code. Inspired by edl-cr.

Item Status
Repository issue pull requests
Dependencies dependencies
Build github
Coverage master dev
Package myget myget

Install

.NET Tool

CodeRunner is packed as a .NET Tool, and is pushed to MyGet. Use the following command to install it as global tool:

dotnet tool install -g CodeRunner --version 0.0.1-pre --add-source https://www.myget.org/F/stardustdl/api/v3/index.json

Binary Files

See the latest action CI-CD, and download the artifacts built for your OS.

CLI Mode

Option Description
-d --dir Set working directory
-c --command Execute command just like in interactive mode
-V --version Show CR version
-v --verbose Enable DEBUG level for logging

Interactive Mode

If you don't use --command options, CR will run in interactive mode.

Initialize

> init

Initialize CR data. It will create a directory named .cr in current directory.

If you want to clear CR data, use this command:

> init --delete

Create and Run

Create a new item:

> new cpp a

It will use templates in .cr/templates/ to create item.

If you want to set current work-item with an existed file, use this:

> now -- type=file target=a.cpp

Then use run command to run code.

# run a.cpp
a.cpp> run cpp

Use Directory

Not only use files, you can also use directories to create a unique environment for codes.

# Create a new directory env
> new dir a

# Set a directory env for current
> now -- type=dir target=a

# Run
@a> run dir

For run command, it will use the command list in settings.json in the directory. You can write your own commands in it. And these command works in the directory of current work-item.

Debug

When you meet some errors, for example, CR data loading failing, use debug command to get some information. This is also a useful tool when you create an issue.

Commands

Command Description
init [--delete] Initialize or delete CR data
clear Clear screen
new [Template] [Name] Create new item by template
now [--clear] Change current work-item
run [Operation] Run operation
template [list add remove] Manage templates
operation [list add remove] Manage operations
debug Show debug data
exit Exit CR
--help Get help
--version Get version

Config

The config files is at .cr/

templates/

This directory contains templates.

operations/

This directory contains operations.

Releases

No releases published

Packages

No packages published

Languages