Sharpy is a lightweight, interactive shell written in C#, offering basic filesystem operations, command aliases, debugging utilities, and a custom line-editor with history navigation. Sharpy also has its own scripting language(limited)!
-
Installation / build steps
-
CLI arguments
-
Scripting Language
-
Built-in commands with examples
-
Alias system
-
Debug tools
-
Notes and limitations
username@domain ~/current/path >
git clone https://github.com/VxidDev/Sharpy.git
cd Sharpy
make build
| Argument | Description |
|---|---|
-d |
Enable debug mode |
--debug |
Enable debug mode |
Language is pretty limited for now , but you can use it by create a .ss file and entering sharpy's commands and running it in shell via sscript <file>
HelloWorld.ss
echo Creating a Hello World in C#...
create test.cs
append test.cs using System;
append test.cs static class Program {
append test.cs static void Main() {
append test.cs Console.WriteLine("Hello World!");
append test.cs }
append test.cs }
echo Done!
This create a test.cs with this content:
using System;
static class Program {
static void Main() {
Console.WriteLine("Hello World!");
}
}
theres also asv which means ASsignVariable
asv var 5
echo -v var
output:
5
theres also if
if <logic> <var> <var> <alias/command>
Example:
asv arg1 5
asv arg2 5
if equals arg1 arg2 echo hello world
Current logics available:
- equals
Each command supports --help to print usage.
list --help
You can also check command usage by doing:
help list
- echo
- Print a string or variable.
echo [-v/--var] <string>
- list
- List directory contents. Printed directories use a nice blue gradient.
list <directory>
If no path is provided, it lists the current directory.
- create
- Create a file or directory.
create <filename>
create -d <dirname> # create directory
- remove
- Delete files or directories.
remove <filename>
remove --force <path>
| Mode | Description |
|---|---|
| Normal | Asks for confirmation before deleting files |
--force |
Deletes files and directories recursively without asking |
- append
- Append text to a file.
append <file> <string>
- changedir
- Change working directory.
Supports home shortcut (~ → /home/)
changedir <path>
- read
- Read and print file contents.
read <file>
- help
- Print usage guide for any command.
help <cmd>
- alias
- Create, delete, or display aliases.
alias <name>=<command>
alias --remove <name>
alias --get <name>
Spaces inside the command are written using + (converted back to spaces).
Create alias:
alias ll=list+~/
Use alias:
ll
Get alias value:
alias --get ll
Remove alias:
alias --remove ll
- sdb — Sharpy Debug Tools
- Debug utilities for development.
sdb
sdb --toggle
sdb pAliases
sdb pHistory
sdb isSudo
sdb pDebug
| Subcommand | Description |
|---|---|
--toggle |
Enable/disable debug mode |
pAliases |
Print all aliases (only when debug mode is ON) |
isSudo |
Print current sudo status |
pDebug |
Print current debug status |
pHistory |
Print current history entries to terminal. |
- prompt
Edit existing prompt.
prompt [--clear] <prompt>
prompt |{userStat}|+{userName}+{currDir}++>>
This turns prompt from this:
vxid-dev@VxidDev ~/Coding/sharpy $ >
To this:
|$| vxid-dev ~/Coding/sharpy >>
Careful, you have to replace whitespace with '+'.
- export
Export aliases and current prompt.
export
...Pretty self explanatory right?
All data is stored within /home/<username>/.sharpy folder.
- history
Manipulate the command history.
history [--clear/--pop <amount(int)>]
vxid-dev@VxidDev ~/Coding/C# - Basics/sharpy $ > sdb pHistory
[ID: 0]
[ID: 1] a
[ID: 2] b
[ID: 3] c
[ID: 4] sdb pHistory
PrevMemoryID: 4
vxid-dev@VxidDev ~/Coding/C# - Basics/sharpy $ > history --pop 5
vxid-dev@VxidDev ~/Coding/C# - Basics/sharpy $ > sdb pHistory
[ID: 0] sdb pHistory
PrevMemoryID: 0
| Subcommand | Description |
|---|---|
--clear |
Remove all history entries. |
--pop <int> |
Remove desired amount of entries from the end of entries. |
- whoami
print current user
whoami
example output:
vxid-dev
- currdir
print current working directory
currdir
- makedir
make a directory.
makedir <dirName>
Sharpy uses a custom input system, instead of generic Console.ReadLine() we use:
| Key | Action |
|---|---|
← |
Move cursor left |
→ |
Move cursor right |
↑ |
Previous command in history |
↓ |
Next command |
Backspace |
Delete character before cursor |
Enter |
Confirm input |
-
Memory list — command history
-
Aliases dictionary — string → string mappings
-
Gradient printer — for directory listing
-
Recursive input parser — supports alias recursion
-
External process launcher
-
remove with no --force works only for files, not directories
-
Alias commands cannot include actual spaces; must use +
-
Broken arguments may trigger ArgumentOutOfRangeException from user input split
-
No quoting support ("text with spaces") yet
-
No piping (|) or redirection (>, <)
- Weird behaviour with next/previous command(either 1 click or 2 clicks needed for change).
To submit a bug either open an issue or mail me on stas050595@gmail.com.
I will be really grateful if anyone help me debug the app because I am pretty bad code tester:(
of course, MIT.