https://github.com/GreatBahram/shecan-cli
The Shecan CLI https://shecan.ir
https://github.com/GreatBahram/shecan-cli
cli python3-6 shecan
Last synced: 7 months ago
JSON representation
The Shecan CLI https://shecan.ir
- Host: GitHub
- URL: https://github.com/GreatBahram/shecan-cli
- Owner: GreatBahram
- License: afl-3.0
- Created: 2018-12-09T17:07:51.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T16:19:50.000Z (11 months ago)
- Last Synced: 2025-07-04T04:08:43.438Z (8 months ago)
- Topics: cli, python3-6, shecan
- Language: Python
- Homepage:
- Size: 186 KB
- Stars: 25
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# Shecan CLI
[](https://pypi.org/project/shecan/)
[](https://pypi.org/project/shecan/)
[](https://pypi.org/project/shecan/)
[](https://saythanks.io/to/GreatBahram)
------------------------------------------------------------------------
The Shecan CLI is used to configure your DNS name server based on Shecan website from the command line.
For more about Shecan see https://shecan.ir/
* I wrote this script, because I wanted to configure a couple of linux servers to be able to use docker hub, which are blocked in Iran. And I wanted to get an agent to do it.
## Introduction

## Installation
Install via one of these methods:
with pip:
```shell
python3 -m venv .venv
source .venv/bin/activate
pip install shecan
```
Or with [pipx](https://pipx.pypa.io/stable/):
```shell
pipx install shecan
```
or with [uv](https://docs.astral.sh/uv/guides/tools/):
```shell
uv tool install shecan
```
## Quickstart
* Run ``shecan update`` - It will get Shecan DNS name servers and save them into a configuration file.
* Run ``shecan list`` It will show shecan DNS name servers from the configuration file.
* Run ``shecan set `` This will change your DNS temporarily by moving your current `/etc/resolv.conf` file and replace it with shecan DNS name server. **If you encounter permission problem** run the command this way: `sudo $(which shecan) set`.
* Run ``shecan verify`` It will check your DNS configuration and make sure that shecan works fine for you.
* Run ``shecan restore`` It will restore your previous DNS configuration.
* Run ``shecan show`` It will print your current DNS configuration.
* Run ``shecan --version`` It will show shecan's version.
* Run ``shecan --help`` It will show full command-line options and subcommands.
## Contributing
To contribute to this tool, first checkout the code. Then create a new virtual environment:
```shell
cd shecan-cli
python -m venv .venv
source .venv/bin/activate
```
Now install the dependencies and test dependencies:
```shell
pip install -e '.[dev]'
```
Or if you are using [uv](https://docs.astral.sh/uv/):
```shell
uv sync
```
Install pre-commit hooks to ensure code quality:
```shell
pre-commit install
pre-commit install -t pre-push
```