Skip to main content

CLIF CLI File storage system (CLI Google Drive Essentially)

Project description

CLI FileStor

A CLI app/server meant to be a self hostable version of google drive with customizable storage limits.

Interaction with the server

The server can be interacted with either by the client application or curl

Setup

Both Systems

Just use:

pip install clifilestor

And it can be run: (Client)

clif {option}}

(Server)

clif-server

Server

  1. Install python3 (3.10 Reccomended)
  2. Make sure venv is installed alongside python3
  3. Download and run the app (server-mac) from the github release page. It will handle dependencies on its own (A startup script will run that installs all of them in a venv at runtime).
  4. (Optional) if you want to run it without the executable, install the packages: requests, flask

Client

  1. Download the latest version of the client (client-mac) from the releases page.
  2. Run the client executable.
  3. (Optional) if you want to run the client without the exe overhead, install the packages: requests.

Live Server

WIll be offline going into april 2026. http://187.124.225.245:999 (Server is secure, hosted with gunicorn!)

Demo Video:

https://drive.google.com/file/d/1rXJU0RaOJyMVX-mN0eXn6FDzDeSv1rVL/view?usp=sharing

API Documentation

All of the API endpoints are POST based.

  1. POST: /register - Register a new user. {username: STR, password: STR} password should be a hash of the password for security reasons. It returns a user_id.
  2. POST: /fetch-userdata - retrieve userdata from the server. Requires authenticaion. {user_id: STR, pass_hash: STR}. Returns userdata (usage statistics, username, user_id, etc)
  3. POST: /upload_file - Form data. Upload a file to the server. Requires authenticaion. {user_id: STR, pass_hash: STR, file: FILE} returns status
  4. POST: /list - List all files under the ownership of a file. Requires authenticaion. {user_id: STR, pass_hash: STR} returns a "directories" list.
  5. POST: /retrieve-file - Download a file, Requires authenticaion. {user_id: STR, pass_hash: STR, filename: STR} returns the file in form data.
  6. POST: /translate_uname - Translate username into a user_id. Does not require authentication. {user_name: STR} Returns user_id.
  7. POST: /delete-file - Deletes a file. Requires authenticaion. {user_id: STR, pass_hash: STR, filename: STR} returns status.
  8. POST: /authenticate - Authenticate a user. {user_id: STR, pass_hash: STR} returns status

Authentication

By defualt, the client stores authentication data in a file located in .clif/authdata. It needs to be recreated if you are working in a new directory.

Usage - Client (Script)

client.py signup #Create authdata, and account
client.py login #Login to an existing account (Creates authdata)
client.py list #List all files owned by the user
client.py upload <file> #Upload a file
client.py download <file> #Download a file
client.py info #Get user info
client.py delete <file> #Delete a file
client.py logout #Logout and delete authdata (Deletes authdata)

In the executable, the client will list the options in the terminal using python's input function.

AI usage

As per usual, I dont like using too much AI in my projects as i feel it is dishonest. I wrote most of the code with some help from Jetbrains AI Assistant when i was getting stuck. Additionally, the text completions (Which i havent figured out how to disable yet) was used to speed up the process. AI was used in the server script and the client.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clifilestor-1.0.1.tar.gz (29.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clifilestor-1.0.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file clifilestor-1.0.1.tar.gz.

File metadata

  • Download URL: clifilestor-1.0.1.tar.gz
  • Upload date:
  • Size: 29.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for clifilestor-1.0.1.tar.gz
Algorithm Hash digest
SHA256 04ae4dc49f7200093b7b59ae3a0d7aecd09cb21195935496c93d1edc4d9eaaab
MD5 22bf51e1c3e9d76c2389ac5f48fe0861
BLAKE2b-256 c60aa157be83aa8d34d72f01ebd07c528a35ca6c939c7023ad0fb82a04d8a08e

See more details on using hashes here.

File details

Details for the file clifilestor-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: clifilestor-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for clifilestor-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56f8576e3ff8c3d29b97569b0d58776fa29d0a2937bb8ca5789537d06c52d7ab
MD5 daf9fed8ffb52b1d5e52ba89846deb8e
BLAKE2b-256 f5604c3f4815be89a41a1ed04f2f376fdafe52ef52904cccdf99aca69529c557

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page