elkinaguas / clir Goto Github PK
View Code? Open in Web Editor NEWA clear and fast way to store and recover your commands
License: MIT License
A clear and fast way to store and recover your commands
License: MIT License
Make that a command is added to the system's commands history.
Trying save a new comand:
Traceback (most recent call last):
File "/home/XXXX/.local/bin/clir", line 8, in
sys.exit(cli())
File "/home/xxx/.local/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/xxxx/.local/lib/python3.10/site-packages/rich_click/rich_command.py", line 126, in main
rv = self.invoke(ctx)
File "/home/xxxx/.local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/xxxx/.local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/xxxx/.local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/xxxx/.local/lib/python3.10/site-packages/clir/cli.py", line 38, in new
new_command.save_command()
File "/home/xxx/.local/lib/python3.10/site-packages/clir/utils/objects.py", line 36, in save_command
current_commands[str(command)] = {"description": desc, "tag": tag, "uid": str(uid)}
TypeError: list indices must be integers or slices, not str
I've thought about using a SQLite DB for this.
Make Clir link commands to aliases that are available system-wide.
Create a local backup of commands and config info.
Use a pip package or another way to copy commands to the clipboard.
Add flags that add new commands without the need to use prompts.
Example: clir new -c <command> -d <description> -t <tag>
Delete the commands shown in the table after performing a ls command. This can be risky because all the commands in the commands.json file could be deleted by accident, but it can be useful for deleting commands that belong to a same project and are grouped by tag.
Add an option to edit commands in the terminal. I have thought that using Textual's TextArea could be a nice option.
Automatically initialize the clir environment when any clir command is used for the first time.
This can be useful when running a command that needs specific arguments.
Simple example: Execute an Ansible Playbook, the command can be something like ansible-playbook -i inventory <playbook>
, and when it is executed, clir asks for the argument <playbook>
.
Add a history feature to show the executed, copied, and deleted commands during a certain period of time in the past.
Add the possibility of backup commands and config data regularly online. Maybe use Google Drive, Dropbox, GitHub?
Allow to pass id to commands, like copy and run. This can allow to execute accions faster, like copy and run commands by using aliases.
This of course would be interesting for tables that don't change that often. For instance, a table that a specific tag returns.
Allow using keywords when registering commands in order to improve search with grep.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.