Nbook is a web-based interactive notebook environment, offering a "glass interface" for code execution, terminal access, and project management.
- Interactive Code Execution: Run Python code cells with stateful execution, magic commands (
!), and integrated Matplotlib plotting support. - Integrated Terminal: Full-featured terminal access directly within the web interface using Xterm.js.
- File Explorer: Manage your project workspace with an intuitive file browsing and editing experience.
- Git Integration: Clone repositories directly into your workspace.
- Real-time System Monitoring: Monitor RAM and disk usage directly from the interface.
- Project History & Management: Save, load, rename, export, and delete notebooks, maintaining a clear project history.
- Secure & Free Modes: Operate Nbook in a secure mode with API key protection or a free mode for local development.
- Notebook Conversion: Convert Nbook project files (
.npyor.ngo) into organized code folders. - Modern Web Interface: Built with Flask, Flask-SocketIO, CodeMirror, Tailwind CSS, and jQuery for a responsive and dynamic user experience.
- Persistent Storage: Notebooks are stored in an SQLite database using Flask-SQLAlchemy.
To set up Nbook locally, follow these steps:
-
Clone the repository:
git clone https://github.com/rkriad585/Nbook.git cd Nbook -
Install dependencies: Nbook requires Python and several libraries. It's recommended to use a virtual environment.
pip install Flask Flask-SQLAlchemy Flask-SocketIO GitPython psutil Click matplotlib
After installation, you can start the Nbook server in either free or secure mode:
-
Start in Free Mode: This mode is ideal for local development and does not require an API key.
python app.py free
Access your Nbook instance at
http://127.0.0.1:5000. -
Start in Secure Mode: This mode generates a unique API key for access, enhancing security.
python app.py start
The console will display a URL with the generated API key (e.g.,
http://127.0.0.1:5000?key=YOUR_API_KEY). -
Convert a Notebook: If you have an Nbook project file (e.g.,
my_project.npy), you can convert it to a standard code folder:python app.py convert my_project.npy
This project is licensed under the MIT License.
written by Neorwc