This project serves as the foundational step in creating an AirBnB clone, featuring a command-line interpreter designed to manage AirBnB objects. The command interpreter empowers users to perform essential CRUD (Create, Read, Update, Delete) operations on objects, as well as execute various commands to manipulate and query the application's data.
To launch the command interpreter, execute the console.py script from the terminal:
$ ./console.py
Once the command interpreter is running, you can use the following commands:
help
: Display a list of available commands with their descriptions.quit
orEOF
: Exit the command interpreter.create
: Create a new instance of a specified class.update
: Update the attributes of an existing object.show
: Display information about a specific object.destroy
: Remove a specified object.all
: Display information about all objects or all objects of a specific class.
- Interactive Mode
$ ./console.py
(hbnb) help
Documented commands (type help <topic>):
========================================
EOF help quit
(hbnb) quit
$
- Non-interactive Mode
$ echo "help" | ./console.py
(hbnb)
Documented commands (type help <topic>):
========================================
EOF help quit
(hbnb)
$
$ cat test_help
help
$
$ cat test_help | ./console.py
(hbnb)
Documented commands (type help <topic>):
========================================
EOF help quit
(hbnb)
$
- Create
$(hbnb) create User
- Update
$(hbnb) update User 1234-5678-9012 first_name "John"
- Show
$(hbnb) show User 1234-5678-9012
- Destroy
$(hbnb) destroy User 1234-5678-9012
- All
$(hbnb) all
- All for a Specific Class
$(hbnb) all User
-
Object Management
: Easily create, retrieve, update, and delete objects within the AirBnB application. -
Interactive
andNon-interactive
Modes: Use the command interpreter interactively or supply commands via scripts for automated workflows.
- Basem Ahmed
- Nada Shaban
- Special thanks to the ALX staff for their guidance and support throughout the development of this project.